import upload from '@/utils/upload'
import request from '@/utils/request'



// 用户头像上传
export default function uploadImg(data) {
  return upload({
    url: '/file/upload',
    name: data.name,
    filePath: data.filePath
  })
}

// 添加咨询
export function addAsk(data) {
	return request({
		//url: '/system/user/profile',
		// url: '/system/user/add',
		// 'url': '/auth/register', //微服务版本
		//method: 'put',//put
		//url: '/system/audi',
		url: '/system/ask',
		//url:'http://localhost/dev-api/system/audi',
		method: 'post', //put
		data: data
	})
}


// 列表
export function list(page,num) {
	return request({
		url: '/system/ask/list',
		method: 'post',
		data: {
			page: page,
			num: num
		}
	});
}

// 查询健康咨询列表
export function indexAsk(query) {
  return request({
    url: '/system/ask/index',
    method: 'get',
    params: query
  })
}


// 查询健康咨询列表
export function listAsk(query) {
  return request({
    url: '/system/ask/list',
    method: 'get',
    params: query
  })
}

// 查询健康咨询详细
export function getAsk(id) {
  return request({
    url: '/system/ask/' + id,
    method: 'get'
  })
}

 

// 修改健康咨询
export function updateAsk(data) {
  return request({
    url: '/system/ask',
    method: 'put',
    data: data
  })
}

// 修改健康咨询
export function choseAsk(data) {
  return request({
    url: '/system/chose',
    method: 'put',
    data: data
  })
}

// 删除健康咨询
export function delAsk(id) {
  return request({
    url: '/system/ask/' + id,
    method: 'delete'
  })
}
